<template>
  <div>{{ computedProp }}</div>
</template>

<script>
import { computed, ref } from "@vue/composition-api";
export default {
  setup() {
    const count = ref(1);

    const computedProp = computed({
      get: () => count.value * 2,
      set: val => {
        count.value = val;
      }
    });

    console.log("computedProp.value:", computedProp.value);

    computedProp.value = 3;

    console.log("computedProp.value:", computedProp.value);

    return {
      computedProp
    };
  }
};
</script>

<style scoped></style>
